<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html >
<head>
	<meta name="decorator" content="sysDefault" content="text/html; charset=utf-8"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#key").focus();
			$("#dataForm").validate({
				submitHandler: function(form){
					Oosp_Loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
				<div class="panel panel-default">
				  <div class="panel-heading">
				    <h3 class="panel-title">新增数据
						<a class="btn btn-default btn-sm pull-right" role="button" href="javascript:void(0)" onclick="history.go(-1)">返回</a>
				    </h3>
				  </div>
				  <div class="panel-body">
					<form:form id="dataForm" modelAttribute="sale" action="${contextPath}/pospay/sale/save" method="post" class="form-horizontal" role="form">
						<form:hidden path="id"/>
						<tags:message content="${message}"/>
								<div class="form-group">
									<label for="saleNo" class="col-sm-2 control-label">销售流水号:</label>
									<div class="col-sm-2">
										<form:input id="saleNo" path="saleNo" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="salenoOffline" class="col-sm-2 control-label">单机流水号:</label>
									<div class="col-sm-2">
										<form:input id="salenoOffline" path="salenoOffline" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="saleMac" class="col-sm-2 control-label">销售来源(单机销售、pos机销售、PAD销售:</label>
									<div class="col-sm-2">
										<form:input id="saleMac" path="saleMac" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="saleChannel" class="col-sm-2 control-label">销售渠道(门店销售、批发销售、网络销售:</label>
									<div class="col-sm-2">
										<form:input id="saleChannel" path="saleChannel" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="saletype" class="col-sm-2 control-label">销售单类型(销售、退货:</label>
									<div class="col-sm-2">
										<form:input id="saletype" path="saletype" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="salenoSource" class="col-sm-2 control-label">原销售单号(退货记录原销售单号:</label>
									<div class="col-sm-2">
										<form:input id="salenoSource" path="salenoSource" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="shopId" class="col-sm-2 control-label">销售分店:</label>
									<div class="col-sm-2">
										<form:input id="shopId" path="shopId" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="terminalId" class="col-sm-2 control-label">POS机号:</label>
									<div class="col-sm-2">
										<form:input id="terminalId" path="terminalId" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="casherId" class="col-sm-2 control-label">收银员:</label>
									<div class="col-sm-2">
										<form:input id="casherId" path="casherId" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="opDate" class="col-sm-2 control-label">收银时间:</label>
									<div class="col-sm-2">
										<form:input id="opDate" path="opDate" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="custId" class="col-sm-2 control-label">顾客ID:</label>
									<div class="col-sm-2">
										<form:input id="custId" path="custId" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="oweAmount" class="col-sm-2 control-label">应收金额:</label>
									<div class="col-sm-2">
										<form:input id="oweAmount" path="oweAmount" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="paidAmount" class="col-sm-2 control-label">实收金额:</label>
									<div class="col-sm-2">
										<form:input id="paidAmount" path="paidAmount" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="reduceAmount" class="col-sm-2 control-label">抹零金额(可能明细或整单抹零（四舍五入）:</label>
									<div class="col-sm-2">
										<form:input id="reduceAmount" path="reduceAmount" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="discAmount" class="col-sm-2 control-label">折让金额(销售单明细的折让合计:</label>
									<div class="col-sm-2">
										<form:input id="discAmount" path="discAmount" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="giveAmount" class="col-sm-2 control-label">赠送金额(销售单明细的赠送合计:</label>
									<div class="col-sm-2">
										<form:input id="giveAmount" path="giveAmount" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="taxAmount" class="col-sm-2 control-label">税金合计:</label>
									<div class="col-sm-2">
										<form:input id="taxAmount" path="taxAmount" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="saleTaxAmount" class="col-sm-2 control-label">消费税合计:</label>
									<div class="col-sm-2">
										<form:input id="saleTaxAmount" path="saleTaxAmount" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="vipNo" class="col-sm-2 control-label">会员卡号:</label>
									<div class="col-sm-2">
										<form:input id="vipNo" path="vipNo" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="integalAmount" class="col-sm-2 control-label">积分额:</label>
									<div class="col-sm-2">
										<form:input id="integalAmount" path="integalAmount" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="integalAmountBegin" class="col-sm-2 control-label">期初积分:</label>
									<div class="col-sm-2">
										<form:input id="integalAmountBegin" path="integalAmountBegin" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="uploadFlag" class="col-sm-2 control-label">上传标志:</label>
									<div class="col-sm-2">
										<form:input id="uploadFlag" path="uploadFlag" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="preSaleNo" class="col-sm-2 control-label">预售单号:</label>
									<div class="col-sm-2">
										<form:input id="preSaleNo" path="preSaleNo" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="couponFlag" class="col-sm-2 control-label">是否涉及到送券、送礼等活动:</label>
									<div class="col-sm-2">
										<form:input id="couponFlag" path="couponFlag" maxlength="20" class="form-control required"/>
									</div>
								</div>
								<div class="form-group">
									<label for="billState" class="col-sm-2 control-label">销售单状态(0表示未生成1表示已经生成）:</label>
									<div class="col-sm-2">
										<form:input id="billState" path="billState" maxlength="20" class="form-control required"/>
									</div>
								</div>
						<div class="form-group">
						  <div class="col-sm-offset-2 col-sm-10">
						    <input class="btn btn-primary" type="submit" value="保 存"/>
							<input class="btn btn-default" type="button" value="返 回" onclick="history.go(-1)"/>
						  </div>
						</div>
					</form:form>
				  </div>
				</div>			
			</div>
		</div>
	</div>
</body>
</html>